package src;

import src.Person;

public class Teacher extends Person {

    public int teacherId;
    public String name;
    public int age;
    public Teacher() {

    }

    public  Teacher(String name,int age,int teacherId) {
        this.name=name;
        this.age=age;
        this.teacherId=teacherId;
    }   
    @Override
    public void showMessage() {//重写方法
        System.out.printf("老师的信息是：姓名："+name+" 年龄："+age+" 工号："+teacherId+"\n");
    }
}

